x86/SMP: CPU0's scratch mask is needed earlier
authorJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2016 10:49:20 +0000 (11:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2016 10:49:20 +0000 (11:49 +0100)
commit7469686ccc959765542cd10551f9bd7a602f2cbd
tree15fc429455af4768cef5199f83f46facf98320e0
parentfa25f10f2af877ed6bfa2ddce3d321ff61268c13
x86/SMP: CPU0's scratch mask is needed earlier

When putting together commit 3b61726458 ("x86: introduce and use
scratch CPU mask") I failed to remember that AMD IOMMU setups needs the
scratch mask prior to smp_prepare_cpus() having run. Use a static mask
for the boot CPU instead.

Note that the definition of scratch_cpu0mask could also be put inside a
"NR_CPUS > 2 * BITS_PER_LONG" conditional, but it seems preferable to
me to carry the extra variable in all cases and avoid the #ifdef-ary.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/smpboot.c